package com.wzy.authority.controller;

import com.wzy.authority.base.result.Results;
import com.wzy.authority.domain.SysRoleUser;
import com.wzy.authority.service.SysRoleUserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @program: authorityManagement
 * @description: 权限用户连接表
 * @author: 1
 * @create: 2020-03-17 21:23
 **/
@Controller
@RequestMapping("/roleUser")
public class RoleUserController {

    @Resource
    private SysRoleUserService sysRoleUserServiceImpl;


    @ResponseBody
    @GetMapping("/getRoleUserByUserId/{userId}")
    public Results<SysRoleUser> getRoleUserByUserId(@PathVariable Integer userId){
      return   Results.success("获取数据成功",sysRoleUserServiceImpl.selectRoleUserByUserId(userId));
    }
}
